package com.mew.auc.config;

import com.mew.auc.service.WhiteListService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;


@Component
@Order(1)
@Slf4j
public class StartInitialize implements ApplicationRunner {

    @Autowired
    WhiteListService whiteListService;

    public void start(){
        whiteListService.run();
    }

    @Override
    public void run(ApplicationArguments args) {
        start();
    }
}
